<div xmlns="http://www.w3.org/1999/xhtml"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html">
    <p>Добавление/Редактирование роли</p>
    <h:outputText value="#{roleId}"/>
    <form id="#{method}_roleForm" method="post" action="#{request.contextPath}/admin/index.jsf#ui-tabs-1">
        <h:panelGrid columns="2">
            <h:outputLabel for="#{method}_roleId" value="" styleClass="margin1"/>
            <h:inputHidden id="#{method}_roleId" value="#{rolesBean.id}"/>
            <h:outputLabel id="#{method}_codeLabel" value="#{msgs['roles.code']}:" for="#{method}_roleCode"
                           styleClass="margin1"/>
            <h:inputText id="#{method}_roleCode" value="#{rolesBean.code}"/>
            <h:outputLabel id="#{method}_descriptionLabel" value="#{msgs['roles.description']}:"
                           for="#{method}_roleDescription"
                           styleClass="margin1"/>
            <h:inputText id="#{method}_roleDescription" value="#{rolesBean.description}"/>
        </h:panelGrid>
        <h:panelGroup id="#{method}_submit" styleClass="margin1 centerAlign" layout="block">
            <h:commandButton id="#{method}_roleEdit" value="#{msgs['save']}" styleClass="margin2p"
                             action="#{rolesController.editRole}" />
            <input type="button" id="#{method}_roleCancel" value="#{msgs['cancel']}" class="margin2p"
                             onclick="removeDialog()"/>
        </h:panelGroup>
        <h:panelGroup id="#{method}_rolesErrors" styleClass="padding1" layout="block">
            <h:messages id="#{method}_roleErrorMessages" errorStyle="color: red" warnStyle="color: blue;" infoStyle="color: green;"/>
        </h:panelGroup>
    </form>
</div>